using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._Analysis
{
    /// <summary>
    /// <para>Make Closest Facility Layer</para>
    /// <para>Makes a closest facility network analysis layer and sets its analysis properties. A closest facility analysis layer is useful in determining the closest facility or facilities to an incident based on a specified network cost.</para>
    /// <para>创建最接近的设施点网络分析图层并设置其分析属性。最近设施点分析图层可用于根据指定的网络成本确定离事件点最近的一个或多个设施点。</para>
    /// </summary>    
    [DisplayName("Make Closest Facility Layer")]
    public class MakeClosestFacilityLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeClosestFacilityLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_dataset">
        /// <para>Input Analysis Network</para>
        /// <para>The network dataset on which the closest facility analysis will be performed.</para>
        /// <para>将对其执行最近设施点分析的网络数据集。</para>
        /// </param>
        /// <param name="_out_network_analysis_layer">
        /// <para>Output Layer Name</para>
        /// <para>Name of the closest facility network analysis layer to create.</para>
        /// <para>要创建的最近的设施点网络分析图层的名称。</para>
        /// </param>
        /// <param name="_impedance_attribute">
        /// <para>Impedance Attribute</para>
        /// <para>The cost attribute to be used as impedance in the analysis.</para>
        /// <para>在分析中用作阻抗的成本属性。</para>
        /// </param>
        public MakeClosestFacilityLayer(object _in_network_dataset, object _out_network_analysis_layer, object _impedance_attribute)
        {
            this._in_network_dataset = _in_network_dataset;
            this._out_network_analysis_layer = _out_network_analysis_layer;
            this._impedance_attribute = _impedance_attribute;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Make Closest Facility Layer";

        public override string CallName => "na.MakeClosestFacilityLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_dataset, _out_network_analysis_layer, _impedance_attribute, _travel_from_to.GetGPValue(), _default_cutoff, _default_number_facilities_to_find, _accumulate_attribute_name, _UTurn_policy.GetGPValue(), _restriction_attribute_name, _hierarchy.GetGPValue(), _hierarchy_settings, _output_path_shape.GetGPValue(), _time_of_day, _time_of_day_usage.GetGPValue(), _output_layer];

        /// <summary>
        /// <para>Input Analysis Network</para>
        /// <para>The network dataset on which the closest facility analysis will be performed.</para>
        /// <para>将对其执行最近设施点分析的网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Analysis Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_dataset { get; set; }


        /// <summary>
        /// <para>Output Layer Name</para>
        /// <para>Name of the closest facility network analysis layer to create.</para>
        /// <para>要创建的最近的设施点网络分析图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_network_analysis_layer { get; set; }


        /// <summary>
        /// <para>Impedance Attribute</para>
        /// <para>The cost attribute to be used as impedance in the analysis.</para>
        /// <para>在分析中用作阻抗的成本属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Impedance Attribute")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _impedance_attribute { get; set; }


        /// <summary>
        /// <para>Travel From or To Facility</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of travel between facilities and incidents.</para>
        ///   <bulletList>
        ///     <bullet_item>Facilities to Incidents—Direction of travel is from facilities to incidents. Fire departments commonly use the this setting, since they are concerned with the time it takes to travel from the fire station (facility) to the location of the emergency (incident).</bullet_item><para/>
        ///     <bullet_item>Incidents to Facilities—Direction of travel is from incidents to facilities. Retail stores commonly use this setting, since they are concerned with the time it takes the shoppers (incidents) to reach the store (facility).</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Using this option can find different facilities on a network with one-way restrictions and different impedances based on direction of travel. For instance, a facility may be a 10-minute drive from the incident while traveling from the incident to the facility, but while traveling from the facility to the incident, it may be a 15-minute journey because of different travel time in that direction.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定设施点和事件点之间的行进方向。</para>
        ///   <bulletList>
        ///     <bullet_item>设施点到事件点 - 行进方向是从设施点到事件点。消防部门通常使用此设置，因为他们关心从消防局（设施）到紧急情况（事件）地点所需的时间。</bullet_item><para/>
        ///     <bullet_item>事件点到设施点 - 行进方向是从事件点到设施点。零售商店通常使用此设置，因为他们关心购物者（事件）到达商店（设施）所需的时间。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>使用此选项可以在网络上找到具有单向限制和基于行进方向的不同阻抗的不同设施。例如，从事件点到设施点的旅行距离事件点可能只有 10 分钟的车程，但在从点点到点点的点滴点之间，由于该方向的点差时间不同，点点可能需要 15 分钟的路程。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel From or To Facility")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _travel_from_to_value _travel_from_to { get; set; } = _travel_from_to_value._TRAVEL_TO;

        public enum _travel_from_to_value
        {
            /// <summary>
            /// <para>Incidents to Facilities</para>
            /// <para>Incidents to Facilities—Direction of travel is from incidents to facilities. Retail stores commonly use this setting, since they are concerned with the time it takes the shoppers (incidents) to reach the store (facility).</para>
            /// <para>事件点到设施点 - 行进方向是从事件点到设施点。零售商店通常使用此设置，因为他们关心购物者（事件）到达商店（设施）所需的时间。</para>
            /// </summary>
            [Description("Incidents to Facilities")]
            [GPEnumValue("TRAVEL_TO")]
            _TRAVEL_TO,

            /// <summary>
            /// <para>Facilities to Incidents</para>
            /// <para>Facilities to Incidents—Direction of travel is from facilities to incidents. Fire departments commonly use the this setting, since they are concerned with the time it takes to travel from the fire station (facility) to the location of the emergency (incident).</para>
            /// <para>设施点到事件点 - 行进方向是从设施点到事件点。消防部门通常使用此设置，因为他们关心从消防局（设施）到紧急情况（事件）地点所需的时间。</para>
            /// </summary>
            [Description("Facilities to Incidents")]
            [GPEnumValue("TRAVEL_FROM")]
            _TRAVEL_FROM,

        }

        /// <summary>
        /// <para>Default Cutoff</para>
        /// <para>Default impedance value at which to stop searching for facilities for a given incident. This default can be overridden by specifying the cutoff value on incidents when the direction of travel is from incidents to facilities or by specifying the cutoff value on facilities when the direction of travel is from facilities to incidents.</para>
        /// <para>在该值下停止搜索给定事件的设施点的默认阻抗值。当行进方向从事件点到事件点时，可以通过指定事件点的截止值来覆盖此默认值，或者当行进方向从设施点到事件点时，通过指定点的截止值来覆盖此默认值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Default Cutoff")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _default_cutoff { get; set; } = null;


        /// <summary>
        /// <para>Number of Facilities to Find</para>
        /// <para>Default number of closest facilities to find per incident. The default can be overridden by specifying a value for the TargetFacilityCount property on the incidents.</para>
        /// <para>每个事件要查找的最近设施点的默认数量。可以通过为事件的 TargetFacilityCount 属性指定值来重写默认值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Facilities to Find")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _default_number_facilities_to_find { get; set; } = 1;


        /// <summary>
        /// <para>Accumulators</para>
        /// <para><xdoc>
        ///   <para>A list of cost attributes to be accumulated during analysis. These accumulation attributes are for reference only; the solver only uses the cost attribute specified by the Impedance Attribute parameter to calculate the route.</para>
        ///   <para>For each cost attribute that is accumulated, a Total_[Impedance] property is added to the routes that are output by the solver.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在分析期间要累积的成本属性列表。这些累积属性仅供参考;求解器仅使用阻抗属性参数指定的成本属性来计算路由。</para>
        ///   <para>对于累积的每个成本属性，都会将 Total_[Impedance] 属性添加到求解器输出的路径中。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Accumulators")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _accumulate_attribute_name { get; set; } = null;


        /// <summary>
        /// <para>U-Turn Policy</para>
        /// <para><xdoc>
        ///   <para>Specifies the U-turn policy that will be used at junctions. Allowing U-turns implies that the solver can turn around at a junction and double back on the same street. Given that junctions represent street intersections and dead ends, different vehicles may be able to turn around at some junctions but not at others—it depends on whether the junction represents an intersection or a dead end. To accommodate this, the U-turn policy parameter is implicitly specified by the number of edges that connect to the junction, which is known as junction valency. The acceptable values for this parameter are listed below; each is followed by a description of its meaning in terms of junction valency.</para>
        ///   <bulletList>
        ///     <bullet_item>Allowed—U-turns are permitted at junctions with any number of connected edges. This is the default value.</bullet_item><para/>
        ///     <bullet_item>Not allowed—U-turns are prohibited at all junctions, regardless of junction valency. However, U-turns are still permitted at network locations even when this setting is chosen, but you can set the individual network location's CurbApproach property to prohibit U-turns there as well.</bullet_item><para/>
        ///     <bullet_item>Allowed at dead ends only—U-turns are prohibited at all junctions, except those that have only one adjacent edge (a dead end).</bullet_item><para/>
        ///     <bullet_item>Allowed at dead ends and intersections only—U-turns are prohibited at junctions where exactly two adjacent edges meet but are permitted at intersections (junctions with three or more adjacent edges) and dead ends (junctions with exactly one adjacent edge). Often, networks have extraneous junctions in the middle of road segments. This option prevents vehicles from making U-turns at these locations.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If you need a more precisely defined U-turn policy, consider adding a global turn delay evaluator to a network cost attribute or adjusting its settings if one exists, and pay particular attention to the configuration of reverse turns. You can also set the CurbApproach property of your network locations.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在交汇点使用的 U 形转弯策略。允许掉头意味着求解器可以在交叉路口掉头，并在同一条街道上折返。鉴于交叉路口代表街道交叉路口和死胡同，不同的车辆可能在某些交叉路口掉头，但在其他交叉路口则不能掉头——这取决于交叉路口是代表交叉路口还是死胡同。为了适应这种情况，U 形转弯策略参数由连接到交汇点的边数隐式指定，这称为交汇点化合价。下面列出了此参数的可接受值;每个之后都描述了其在结化合价方面的含义。</para>
        ///   <bulletList>
        ///     <bullet_item>允许 - 允许在具有任意数量连接边的交汇处进行 U 形转弯。这是默认值。</bullet_item><para/>
        ///     <bullet_item>不允许 - 无论交汇点化合价如何，所有交汇点都禁止掉头。但是，即使选择此设置，仍允许在网络位置掉头，但您可以设置单个网络位置的 CurbApproach 属性以禁止掉头。</bullet_item><para/>
        ///     <bullet_item>仅允许在死胡同处 - 所有交汇点都禁止掉头，但只有一个相邻边（死胡同）的交汇点除外。</bullet_item><para/>
        ///     <bullet_item>仅允许在死角和交叉点处 - 在两条相邻边恰好相交的交汇处禁止掉头，但在交叉点（具有三个或更多相邻边的交汇点）和死端（恰好具有一条相邻边的交汇点）允许掉头。通常，网络在路段中间有无关的交叉路口。此选项可防止车辆在这些位置掉头。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果需要更精确地定义掉头策略，请考虑将全局转弯延迟评估器添加到网络成本属性或调整其设置（如果存在），并特别注意倒车转弯的配置。还可以设置网络位置的 CurbApproach 属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("U-Turn Policy")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _UTurn_policy_value _UTurn_policy { get; set; } = _UTurn_policy_value._ALLOW_UTURNS;

        public enum _UTurn_policy_value
        {
            /// <summary>
            /// <para>Allowed</para>
            /// <para>Allowed—U-turns are permitted at junctions with any number of connected edges. This is the default value.</para>
            /// <para>允许 - 允许在具有任意数量连接边的交汇处进行 U 形转弯。这是默认值。</para>
            /// </summary>
            [Description("Allowed")]
            [GPEnumValue("ALLOW_UTURNS")]
            _ALLOW_UTURNS,

            /// <summary>
            /// <para>Not allowed</para>
            /// <para>Not allowed—U-turns are prohibited at all junctions, regardless of junction valency. However, U-turns are still permitted at network locations even when this setting is chosen, but you can set the individual network location's CurbApproach property to prohibit U-turns there as well.</para>
            /// <para>不允许 - 无论交汇点化合价如何，所有交汇点都禁止掉头。但是，即使选择此设置，仍允许在网络位置掉头，但您可以设置单个网络位置的 CurbApproach 属性以禁止掉头。</para>
            /// </summary>
            [Description("Not allowed")]
            [GPEnumValue("NO_UTURNS")]
            _NO_UTURNS,

            /// <summary>
            /// <para>Allowed at dead ends only</para>
            /// <para>Allowed at dead ends only—U-turns are prohibited at all junctions, except those that have only one adjacent edge (a dead end).</para>
            /// <para>仅允许在死胡同处 - 所有交汇点都禁止掉头，但只有一个相邻边（死胡同）的交汇点除外。</para>
            /// </summary>
            [Description("Allowed at dead ends only")]
            [GPEnumValue("ALLOW_DEAD_ENDS_ONLY")]
            _ALLOW_DEAD_ENDS_ONLY,

            /// <summary>
            /// <para>Allowed at dead ends and intersections only</para>
            /// <para>Allowed at dead ends and intersections only—U-turns are prohibited at junctions where exactly two adjacent edges meet but are permitted at intersections (junctions with three or more adjacent edges) and dead ends (junctions with exactly one adjacent edge). Often, networks have extraneous junctions in the middle of road segments. This option prevents vehicles from making U-turns at these locations.</para>
            /// <para>仅允许在死角和交叉点处 - 在两条相邻边恰好相交的交汇处禁止掉头，但在交叉点（具有三个或更多相邻边的交汇点）和死端（恰好具有一条相邻边的交汇点）允许掉头。通常，网络在路段中间有无关的交叉路口。此选项可防止车辆在这些位置掉头。</para>
            /// </summary>
            [Description("Allowed at dead ends and intersections only")]
            [GPEnumValue("ALLOW_DEAD_ENDS_AND_INTERSECTIONS_ONLY")]
            _ALLOW_DEAD_ENDS_AND_INTERSECTIONS_ONLY,

        }

        /// <summary>
        /// <para>Restrictions</para>
        /// <para>A list of restriction attributes to be applied during the analysis.</para>
        /// <para>在分析期间要应用的限制属性列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Restrictions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _restriction_attribute_name { get; set; } = null;


        /// <summary>
        /// <para>Use Hierarchy in Analysis</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—The hierarchy attribute will be used for the analysis. Using a hierarchy results in the solver preferring higher-order edges to lower-order edges. Hierarchical solves are faster, and they can be used to simulate the preference of a driver who chooses to travel on freeways rather than local roads when possible—even if that means a longer trip. This option is active only if the input network dataset has a hierarchy attribute.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The hierarchy attribute will not be used for the analysis. If hierarchy is not used, the result is an exact route for the network dataset.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The parameter is inactive if a hierarchy attribute is not defined on the network dataset used to perform the analysis.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 - 层次结构属性将用于分析。使用层次结构会导致求解器优先选择高阶边而不是低阶边。分层求解速度更快，并且可用于模拟驾驶员的偏好，如果可能的话，他们选择在高速公路上行驶而不是在本地道路上行驶，即使这意味着更长的行程。仅当输入网络数据集具有层次结构属性时，此选项才处于活动状态。</bullet_item><para/>
        ///     <bullet_item>未选中 - 等级属性将不用于分析。如果未使用层次结构，则结果是网络数据集的精确路径。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果未在用于执行分析的网络数据集上定义层次结构属性，则该参数处于非活动状态。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Hierarchy in Analysis")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _hierarchy_value? _hierarchy { get; set; } = null;

        public enum _hierarchy_value
        {
            /// <summary>
            /// <para>USE_HIERARCHY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_HIERARCHY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_HIERARCHY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_HIERARCHY")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Hierarchy Rank Settings</para>
        /// <para>Prior to version 10, this parameter allowed you to change the hierarchy ranges for your analysis from the default hierarchy ranges established in the network dataset. At version 10, this parameter is no longer supported. To change the hierarchy ranges for your analysis, update the default hierarchy ranges in the network dataset.</para>
        /// <para>在版本 10 之前，此参数允许您从网络数据集中建立的默认层次结构范围更改分析的层次结构范围。在版本 10 中，不再支持此参数。要更改分析的层次结构范围，请更新网络数据集中的默认层次结构范围。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Hierarchy Rank Settings")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _hierarchy_settings { get; set; } = null;


        /// <summary>
        /// <para>Output Path Shape</para>
        /// <para><xdoc>
        ///   <para>Specifies the shape type for the route features that are output by the analysis.</para>
        ///   <bulletList>
        ///     <bullet_item>True lines with measures—The output routes will have the exact shape of the underlying network sources. The output includes route measurements for linear referencing. The measurements increase from the first stop and record the cumulative impedance to reach a given position.</bullet_item><para/>
        ///     <bullet_item>True lines without measures—The output routes will have the exact shape of the underlying network sources.</bullet_item><para/>
        ///     <bullet_item>Straight lines—The output route shape will be a single straight line between each paired incident and facility.</bullet_item><para/>
        ///     <bullet_item>No lines—No shape will be generated for the output routes.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>No matter which output shape type is chosen, the best route is always determined by the network impedance, never Euclidean distance. This means that only the route shapes are different, not the underlying traversal of the network.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定分析输出的路径要素的形状类型。</para>
        ///   <bulletList>
        ///     <bullet_item>带度量值的真线 - 输出路由将具有基础网络源的确切形状。输出包括用于线性参考的路径测量值。测量值从第一站开始增加，并记录累积阻抗以达到给定位置。</bullet_item><para/>
        ///     <bullet_item>无测量值的真线 - 输出路径将具有基础网络源的确切形状。</bullet_item><para/>
        ///     <bullet_item>直线—输出路径形状将为每个配对事件点和设施点之间的一条直线。</bullet_item><para/>
        ///     <bullet_item>无线 - 不会为输出路径生成任何形状。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>无论选择哪种输出形状类型，最佳路由始终由网络阻抗决定，而不是欧几里得距离。这意味着只有路由形状不同，而网络的基础遍历不同。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Path Shape")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _output_path_shape_value _output_path_shape { get; set; } = _output_path_shape_value._TRUE_LINES_WITH_MEASURES;

        public enum _output_path_shape_value
        {
            /// <summary>
            /// <para>No lines</para>
            /// <para>No lines—No shape will be generated for the output routes.</para>
            /// <para>无线 - 不会为输出路径生成任何形状。</para>
            /// </summary>
            [Description("No lines")]
            [GPEnumValue("NO_LINES")]
            _NO_LINES,

            /// <summary>
            /// <para>Straight lines</para>
            /// <para>Straight lines—The output route shape will be a single straight line between each paired incident and facility.</para>
            /// <para>直线—输出路径形状将为每个配对事件点和设施点之间的一条直线。</para>
            /// </summary>
            [Description("Straight lines")]
            [GPEnumValue("STRAIGHT_LINES")]
            _STRAIGHT_LINES,

            /// <summary>
            /// <para>True lines with measures</para>
            /// <para>True lines with measures—The output routes will have the exact shape of the underlying network sources. The output includes route measurements for linear referencing. The measurements increase from the first stop and record the cumulative impedance to reach a given position.</para>
            /// <para>带度量值的真线 - 输出路由将具有基础网络源的确切形状。输出包括用于线性参考的路径测量值。测量值从第一站开始增加，并记录累积阻抗以达到给定位置。</para>
            /// </summary>
            [Description("True lines with measures")]
            [GPEnumValue("TRUE_LINES_WITH_MEASURES")]
            _TRUE_LINES_WITH_MEASURES,

            /// <summary>
            /// <para>True lines without measures</para>
            /// <para>True lines without measures—The output routes will have the exact shape of the underlying network sources.</para>
            /// <para>无测量值的真线 - 输出路径将具有基础网络源的确切形状。</para>
            /// </summary>
            [Description("True lines without measures")]
            [GPEnumValue("TRUE_LINES_WITHOUT_MEASURES")]
            _TRUE_LINES_WITHOUT_MEASURES,

        }

        /// <summary>
        /// <para>Time of Day</para>
        /// <para><xdoc>
        ///   <para>Specifies the time and date at which the routes should begin or end. The interpretation of this value depends on whether Time of Day Usage is set to be the start time or the end time of the route.</para>
        ///   <para>If you have chosen a traffic-based impedance attribute, the solution will be generated given dynamic traffic conditions at the time of day specified here. A date and time can be specified as 5/14/2012 10:30 AM.</para>
        ///   <para>Instead of using a particular date, a day of the week can be specified using the following dates:
        ///   <bulletList>
        ///     <bullet_item>Today—12/30/1899  </bullet_item><para/>
        ///     <bullet_item>Sunday—12/31/1899  </bullet_item><para/>
        ///     <bullet_item>Monday—1/1/1900  </bullet_item><para/>
        ///     <bullet_item>Tuesday—1/2/1900  </bullet_item><para/>
        ///     <bullet_item>Wednesday—1/3/1900  </bullet_item><para/>
        ///     <bullet_item>Thursday—1/4/1900  </bullet_item><para/>
        ///     <bullet_item>Friday—1/5/1900  </bullet_item><para/>
        ///     <bullet_item>Saturday—1/6/1900  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定路由开始或结束的时间和日期。此值的解释取决于“使用时间”是设置为路由的开始时间还是结束时间。</para>
        ///   <para>如果选择了基于流量的阻抗属性，则将在此处指定的一天中的时间根据动态流量条件生成解决方案。日期和时间可以指定为 2012 年 5 月 14 日上午 10：30。</para>
        /// 可以使用<para>以下日期指定星期几，而不是使用特定日期：
        ///   <bulletList>
        ///     <bullet_item>今天 - 1899 年 12 月 30 日</bullet_item><para/>
        ///     <bullet_item>星期日—1899年12月31日</bullet_item><para/>
        ///     <bullet_item>星期一 - 1/1/1900</bullet_item><para/>
        ///     <bullet_item>星期二 - 1/2/1900</bullet_item><para/>
        ///     <bullet_item>星期三 - 1/3/1900</bullet_item><para/>
        ///     <bullet_item>星期四—1/4/1900</bullet_item><para/>
        ///     <bullet_item>星期五 - 1/5/1900</bullet_item><para/>
        ///     <bullet_item>星期六 - 1/6/1900</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Time of Day Usage</para>
        /// <para><xdoc>
        ///   <para>Indicates whether the value of the Time of Day parameter represents the arrival or departure time for the route or routes.</para>
        ///   <bulletList>
        ///     <bullet_item>Start time—Time of Day is interpreted as the departure time from the facility or incident.When this setting is chosen, Time of Day indicates the solver should find the best route given a departure time.</bullet_item><para/>
        ///     <bullet_item>End time—Time of Day is interpreted as the arrival time at the facility or incident. This option is useful if you want to know what time to depart from a location so that you arrive at the destination at the time specified in Time of Day.</bullet_item><para/>
        ///     <bullet_item>Not used—When Time of Day doesn't have a value, this setting is the only choice. When Time of Day has a value, this setting isn't available.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示“时间”参数的值是表示一个或多个路线的到达时间还是离开时间。</para>
        ///   <bulletList>
        ///     <bullet_item>开始时间 - 一天中的时间被解释为从设施点或事件点出发的时间。选择此设置后，Time of Day 指示求解器应找到给定出发时间的最佳路线。</bullet_item><para/>
        ///     <bullet_item>结束时间 - 一天中的时间被解释为到达设施点或事件点的时间。如果您想知道从某个位置出发的时间，以便在一天中的时间指定的时间到达目的地，则此选项非常有用。</bullet_item><para/>
        ///     <bullet_item>未使用 - 当“时间”没有值时，此设置是唯一选择。当“时间”具有值时，此设置不可用。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day Usage")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _time_of_day_usage_value _time_of_day_usage { get; set; } = _time_of_day_usage_value._NOT_USED;

        public enum _time_of_day_usage_value
        {
            /// <summary>
            /// <para>Start time</para>
            /// <para>Start time—Time of Day is interpreted as the departure time from the facility or incident.When this setting is chosen, Time of Day indicates the solver should find the best route given a departure time.</para>
            /// <para>开始时间 - 一天中的时间被解释为从设施点或事件点出发的时间。选择此设置后，Time of Day 指示求解器应找到给定出发时间的最佳路线。</para>
            /// </summary>
            [Description("Start time")]
            [GPEnumValue("START_TIME")]
            _START_TIME,

            /// <summary>
            /// <para>End time</para>
            /// <para>End time—Time of Day is interpreted as the arrival time at the facility or incident. This option is useful if you want to know what time to depart from a location so that you arrive at the destination at the time specified in Time of Day.</para>
            /// <para>结束时间 - 一天中的时间被解释为到达设施点或事件点的时间。如果您想知道从某个位置出发的时间，以便在一天中的时间指定的时间到达目的地，则此选项非常有用。</para>
            /// </summary>
            [Description("End time")]
            [GPEnumValue("END_TIME")]
            _END_TIME,

            /// <summary>
            /// <para>Not used</para>
            /// <para>Not used—When Time of Day doesn't have a value, this setting is the only choice. When Time of Day has a value, this setting isn't available.</para>
            /// <para>未使用 - 当“时间”没有值时，此设置是唯一选择。当“时间”具有值时，此设置不可用。</para>
            /// </summary>
            [Description("Not used")]
            [GPEnumValue("NOT_USED")]
            _NOT_USED,

        }

        /// <summary>
        /// <para>Network Analyst Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Analyst Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_layer { get; set; }


        public MakeClosestFacilityLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}